
// 用户接口相关的模块
import request from '@/utils/request'
// 1. 登录接口
export const reqLogin = data => request({
  method: 'post',
  url: 'sys/login',
  data
})
// 2. 获取用户基本资料
export const reqGetUserInfo = () => request({
  method: 'post',
  url: '/sys/profile'
  // 配置请求头挂载 Authorization 值是Bearer token
  // headers: {
  //   Authorization: `Bearer ${store.getters.token}`
  // }
})
// 3. 获取带头像的用户信息
export const reqGetUserDetailById = id => request({
  method: 'get',
  url: `/sys/user/${id}`
})

